<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>授权登陆</title>
</head>

<body>
  <div style="text-align: center;margin: 300px 50px;">
    <button onclick="auth()">微信授权</button>
  </div>
  <script src="./node_modules/axios/dist/axios.min.js"></script>
  <script>
    // 授权
    function auth() {
      // 1. get跳转路径请求
      location.href = 'http://server.utools.club/auth?cb=http://server.utools.club/user6'

      // 2. 异步ajax请求
      // axios.get('http://localhost:3000/auth').then(res => {
      //   let { data } = res
      //   location.href = data
      // })


    }
  </script>
</body>

</html>